/*
ID: simplyz2
LANG: C
TASK: namenum
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX_LEN 13
#define MAX_NUM 5001
#define DIC "dict.txt"
int total, len, flag;
char digits[MAX_LEN], name[MAX_LEN], dic[MAX_NUM][MAX_LEN];
const char mapping[8][4] = {
	"ABC", "DEF", "GHI", "JKL", "MNO", "PRS", "TUV", "WXY" };

int
compare(const void *arg1, const void *arg2) /* binary search */
{
	return strcmp((char *)arg1, (char *)arg2);
}

void
read_dic() /* already sorted ascending */
{
	FILE *file;
	total = 0;
	file = fopen(DIC, "r");
	while(fscanf(file, "%s", dic[total++]) != EOF);
	fclose(file);
}

void
solve(int n)
{
	int i, index;
	if(n == len) {
		if(bsearch(name, dic, total, sizeof(dic[0]), compare) != NULL) {
			flag = 1;
			printf("%s\n", name);
		}
		return;
	}
	index = digits[n]-'0'-2;
	for(i=0; i<3; i++) {
		name[n] = mapping[index][i];
		solve(n+1);
	}
}

int
main(int argc, char **argv)
{
	freopen("namenum.in", "r", stdin);
	freopen("namenum.out", "w", stdout);
	read_dic();
	while(scanf("%s", digits) != EOF) {
		flag = 0;
		len = strlen(digits);
		memset(name, 0, sizeof(name));
		solve(0);
		if(!flag)
			printf("NONE\n");
	}
	return 0;
}
